package com.lanchetech.dao;

import com.lanchetech.bean.request.TenantPageReq;
import com.lanchetech.bean.vo.TenantInfoVO;
import com.lanchetech.entity.Tenant;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface TenantMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Tenant record);

    int insertSelective(Tenant record);

    Tenant selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Tenant record);

    int updateByPrimaryKey(Tenant record);

    int insertWithId(Tenant record);

    TenantInfoVO getTenantInfoById(@Param("id") Long id);

    Tenant findOneByMerchantId(@Param("merchantId") Long merchantId);

    List<Tenant> findAllPage(TenantPageReq req);

    List<Tenant> findAllByIds(@Param("ids") List<Long> ids);

    List<Tenant> findFullAllByIds(@Param("ids") List<Long> ids);

    int updateDescriptionById(@Param("updatedDescription") String updatedDescription, @Param("id") Long id);

    int updateImageUrlById(@Param("updatedImageUrl") String updatedImageUrl, @Param("id") Long id);

    int updateStarById(@Param("updatedStar") Double updatedStar, @Param("id") Long id);

    int updateFeatureById(@Param("updatedFeature") String updatedFeature, @Param("id") Long id);

    int updatePointById(@Param("updatedPoint") BigDecimal updatedPoint, @Param("id") Long id);

    int updateCoinById(@Param("updatedCoin") BigDecimal updatedCoin, @Param("id") Long id);

    int updateStatusById(@Param("updatedStatus") Byte updatedStatus, @Param("id") Long id);

    int updateContentAndVideoUrlAndUpdatedAtById(Tenant tenant);

    int updateAutoReplyFormatById(@Param("updatedAutoReplyFormat")String updatedAutoReplyFormat,@Param("id")Long id);


}